Improvement: Set system status to started when print timer started (M75)#335
Open
nivekmai wants to merge 2 commits intoSnapmaker:mainfrom
Open
Improvement: Set system status to started when print timer started (M75)#335nivekmai wants to merge 2 commits intoSnapmaker:mainfrom
nivekmai wants to merge 2 commits intoSnapmaker:mainfrom
Conversation
Add an event to be sent to `systemservice` when a job is marked as started with M75. Motivation: Currently, when a print is started from octoprint (or anything not the HMI), the `SystemService.cur_status_` is not updated. This then causes us to not handle filament runout, since there's a conditional check that the status must be `SYSTAT_WORK`: https://github.com/Snapmaker/Snapmaker2-Controller/blob/main/Marlin/src/feature/runout.h#L100 Additionally, M75 and M77 are currently "unsupported". I'm assuming that this is just that they are not actually upgraded to work with Snapmaker's cusotmiztions. We can use M75 and M77 to update the system service status so that runout detection is activated when a print job is "started". This diff will add the necessary `SystemService` calls to make sure that `SystemService` status is set to `SYSTAT_WORK` when a job is in progress (after M75) and back to `SYSTAT_IDLE` when the job finishes. By itself, this will have no influence on the operation of the machine, since luban and the HMI do not ever use M75 or M77. However, in combination with some configuration in octoprint, this diff enables the ability for runout detection to be triggered when printing via octoprint.
Collaborator
|
Thank you for your contribution. We will carefully review and consider them for inclusion in the next iteration. |
|
@huang-w-y what is the time frame for reviewing this PR? This is a needed item for some that are not using luban. |
|
I would also like to see this reviewed and included. Any updates? |
|
@parachvte @zauguin @kai-waang You all seem to be the few that are still active in GH, who can help with this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an event to be sent to
systemservicewhen a job is marked as started with M75.Motivation: Currently, when a print is started from octoprint (or anything not the HMI), the
SystemService.cur_status_is not updated. This then causes us to not handle filament runout, since there's a conditional check that the status must beSYSTAT_WORK: https://github.com/Snapmaker/Snapmaker2-Controller/blob/main/Marlin/src/feature/runout.h#L100Additionally, M75 and M77 are currently "unsupported". I'm assuming that this is just that they are not actually upgraded to work with Snapmaker's cusotmiztions.
We can use M75 and M77 to update the system service status so that runout detection is activated when a print job is "started".
This diff will add the necessary
SystemServicecalls to make sure thatSystemServicestatus is set toSYSTAT_WORKwhen a job is in progress (after M75) and back toSYSTAT_IDLEwhen the job finishes.By itself, this will have no influence on the operation of the machine, since luban and the HMI do not ever use M75 or M77. However, in combination with some configuration in octoprint, this diff enables the ability for runout detection to be triggered when printing via octoprint.